const Configuration = require('webpack')
const path = require('path')

/**
 *
 * @type {Configuration} //配置智能提示
 */
const config = {
    //入口文件
    entry: "./src/index.ts",
    mode: "none",
    output: {
        filename: "index.js",
        path: path.resolve(__dirname, 'lib'),
        library: 'helloWorld',
        libraryTarget: "umd",
        umdNamedDefine: true
    },
    externals: {},
    module: {
        rules: [
            {
                test: /\.ts$/,
                // use: "ts-loader"
                use: "swc-loader"
            }
        ]
    }
}


module.exports = config